package org.github.manx98.jlibhac.fs.fsa;

/**
 * @author Manx98
 * @version 1.0
 * @since 2022/10/3 13:47
 */
public enum OpenMode {
    Read(1),
    Write(2),
    AllowAppend(4),
    ReadWrite(Read.value | Write.value),
    All(Read.value | Write.value | AllowAppend.value);

    public final int value;

    OpenMode(int i) {
        this.value = i;
    }

    public boolean hasFlag(OpenMode read) {
        return (value & read.value) > 0;
    }
}
